package com.iot08.push.service;

import com.iot08.common.entity.app.Account;
import com.iot08.common.service.base.BaseService;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service;

/**
 * @version 1.0
 * @Description:
 * @time: 2020/9/22 18:30
 * @author: Rock
 */
@Service
public class AccountService extends BaseService<Account> {

    /**
     * @param [id]
     * @time: 2020/9/22 18:37
     * @author: Rock
     * @version 1.0
     */
    public Account getById(String id) {
        Query query = new Query(Criteria.where("_id").is(id));
        query.fields().include("_id").include("badge");
        return this.findOne(query);
    }

}
